-- GENERATED SPELL FOR [Witherbark Caller] --


function spell0_2654(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20825,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2654', 3000, 1)
end

function spell1_2654(pUnit, Event) --@Summon Witherbark Felhunter,Self--
pUnit:FullCastSpellOnTarget(11017,pUnit)
pUnit:RegisterEvent('Sorts_2654', 3000, 1)
end

function Sorts_2654(pUnit, Event)
local choix_sorts_2654 = math.random(0, 1)
if choix_sorts_2654 == 0 then
pUnit:RegisterEvent('spell0_2654', 1, 1)
end
if choix_sorts_2654 == 1 then
pUnit:RegisterEvent('spell1_2654', 1, 1)
end
end

function mob2654_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2654', math.random(1500, 3000), 1)
end

function mob2654_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2654_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2654_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2654, 1, 'mob2654_Action')
RegisterUnitEvent(2654, 2, 'mob2654_Leave')
RegisterUnitEvent(2654, 3, 'mob2654_Kill')
RegisterUnitEvent(2654, 4, 'mob2654_Die')
